package com.liujun.spring4x.demo.web.vo.restful;



/**
 * instance info
 *
 * @author liujun
 * @version 0.0.1
 * @date 2018/10/18
 */
public class InstanceInfo {

  /** sandbox name */
  private String sandboxName;

  /** tenant info */
  private String tenant;

  /** instance info */
  private String instance;

  /** schema info */
  private String schema;

  /** tablename */
  private String table;

  public void parseInstace(String data) {
    String[] spitData = data.split("___");

    this.sandboxName = spitData[0];
    this.tenant = spitData[1];
    this.instance = spitData[2];
    this.schema = spitData[3];
    this.table = spitData[4];
  }

  public String getSandboxName() {
    return sandboxName;
  }

  public void setSandboxName(String sandboxName) {
    this.sandboxName = sandboxName;
  }

  public String getInstance() {
    return instance;
  }

  public void setInstance(String instance) {
    this.instance = instance;
  }

  public String getTenant() {
    return tenant;
  }

  public void setTenant(String tenant) {
    this.tenant = tenant;
  }

  public String getSchema() {
    return schema;
  }

  public void setSchema(String schema) {
    this.schema = schema;
  }

  public String getTable() {
    return table;
  }

  public void setTable(String table) {
    this.table = table;
  }

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder("InstanceInfo{");
    sb.append("sandboxName='").append(sandboxName).append('\'');
    sb.append(", tenant='").append(tenant).append('\'');
    sb.append(", instance='").append(instance).append('\'');
    sb.append(", schema='").append(schema).append('\'');
    sb.append(", table='").append(table).append('\'');
    sb.append('}');
    return sb.toString();
  }
}
